package mover;

public class SimpleMover extends GameMover {
	
	public SimpleMover(int xMove, int yMove) {
		this.xMove = xMove;
		this.yMove = yMove;
	}

	@Override
	public void move(int counter) {
		//Timesaver
		if(xMove == 0 && yMove == 0) return;
		
		if(xMove != 0 && counter % xMove == 0) {
			xPos += signum(xMove) * xMult;
		}
		if(yMove != 0 && counter % yMove == 0) {
			yPos += signum(yMove) * yMult;
		}
	}

	@Override
	public SimpleMover clone() throws CloneNotSupportedException {
		SimpleMover clone = new SimpleMover(this.xMove, this.yMove);
		this.clone_help(clone);
		
		return clone;
	}
}